const install = function (Vue) {
	const Bus = new Vue({
		methods: {
			// 总线代理 $emit $on $off 三个事件
			emit (event, ...args) {
				this.$emit(event, ...args);
			},
			on (event, callback) {
				this.$on(event, callback)
			},
			off (event, callback) {
				this.$off(event, callback);     
			}
		}
	});
	Vue.prototype.$bus = Bus;
};
export default install;
